package toast

import (
	"github.com/gen2brain/beeep"
	"github.com/wailsapp/wails/v2/pkg/runtime"
	ctx2 "ideatools/application/core/ctx"
)

// FrontError 前端显示
func FrontError(msg string, timeout int) {
	ctx := ctx2.GetCtx()
	if ctx != nil {
		runtime.EventsEmit(ctx, "show_error", msg, timeout)
	}
}

func SysInfo(title, content string) error {
	return beeep.Notify(title, content, "")
}
